home *** CD-ROM | disk | FTP | other *** search
- /**
- AEFX_Sample.h
-
- Part of the Adobe After Effects 3.1 SDK
- Copyright (c)1993-96, Adobe Systems Inc, All Rights Reserved.
-
- Revision History
- 1.0, created by dmw
- **/
-
- #ifndef _H_AEFX_SAMPLE
- #define _H_AEFX_SAMPLE
-
- #include "AE_EffectUI.h"
- #include "AE_EffectCB.h"
- #include "AE_Macros.h"
-
- #include <A4Stuff.h>
-
- #if !defined(powerc)
-
- #define SAM_DECLARE_A4 long old_a4;
- #define SAM_SET_A4 old_a4 = SetCurrentA4();
- #define SAM_RESTORE_A4 SetA4(old_a4);
-
- #else
-
- #define SAM_DECLARE_A4
- #define SAM_SET_A4
- #define SAM_RESTORE_A4
-
- #endif
-
-
- #define FIX2INT(X) ((long)(X) >> 16)
- #define INT2FIX(X) ((long)(X) << 16)
- #define FIX2INT_ROUND(X) (FIX2INT((X) + 32768))
- #define FIX_2_FLOAT(X) ((double)(X) / 65536.0)
- #define FLOAT2FIX(F) ((PF_Fixed)((F) * 65536 + (((F) < 0) ? -0.5 : 0.5)))
- #define ABS(N) ((N) < 0 ? -(N) : (N))
-
- #define PF_RECT_2_FIXEDRECT(R,FR) do { \
- (FR).left = INT2FIX((R).left); \
- (FR).top = INT2FIX((R).top); \
- (FR).right = INT2FIX((R).right); \
- (FR).bottom = INT2FIX((R).bottom); \
- } while (0)
-
- #define PF_FIXEDRECT_2_RECT(FR,R) do { \
- (R).left = FIX2INT_ROUND((FR).left); \
- (R).top = FIX2INT_ROUND((FR).top); \
- (R).right = FIX2INT_ROUND((FR).right); \
- (R).bottom = FIX2INT_ROUND((FR).bottom);\
- } while (0)
-
- #define SAM_SLOP 16
-
- #define MAJOR_VERSION 1
- #define MINOR_VERSION 1
- #define BUG_VERSION 0
- #define STAGE_VERSION PF_Stage_RELEASE
- #define BUILD_VERSION 0
-
- #define NAME "Custom UI"
- #define DESCRIPTION "Sample of a custom UI element."
-
- enum {
- SAM_X_RADIUS = 1,
- SAM_Y_RADIUS,
- SAM_PT,
- SAM_NUM_PARAMS
- };
-
- #define SAM_RADIUS_BIG_MAX INT2FIX(8000L)
- #define SAM_RADIUS_MAX INT2FIX(250L)
- #define SAM_RADIUS_MIN 0
- #define SAM_RADIUS_DFLT INT2FIX(50L)
-
- #define SAM_PTX_DFLT INT2FIX(50L)
- #define SAM_PTY_DFLT INT2FIX(50L)
-
-
- typedef struct {
- PF_Fixed left, top, right, bottom;
- } PF_FixedRect;
-
- typedef void (*FrameFunc)(PF_InData*, PF_EventExtra*, Point*, Point*, PF_FixedPoint*);
-
-
- PF_Err SAM_RotateMatrixPlus (
- PF_FloatMatrix *m, /* <> */
- PF_InData *in_data, /* << */
- PF_FpLong degrees, /* >> */
- PF_FpLong aboutX, /* >> */
- PF_FpLong aboutY ); /* >> */
-
-
- PF_Err SAM_SetIdentityMatrix (PF_FloatMatrix *matrix);
-
-
- PF_Err SAM_ScaleMatrix (
- PF_FloatMatrix *m, /* <> */
- PF_FpLong scaleX, /* >> */
- PF_FpLong scaleY, /* >> */
- PF_FpLong aboutX, /* >> */
- PF_FpLong aboutY ); /* >> */
-
-
-
- PF_Err SAM_RotateMatrixPlus (
- PF_FloatMatrix *m, /* <> */
- PF_InData *in_data, /* << */
- PF_FpLong degrees, /* >> */
- PF_FpLong aboutX, /* >> */
- PF_FpLong aboutY ); /* >> */
-
- PF_Err SAM_ConcatMatrix (
- const PF_FloatMatrix *src, /* >> */
- PF_FloatMatrix *dst ); /* <> */
-
- PF_Err SAM_TransformFixPoints (
- const PF_FloatMatrix *m, /* >> */
- long count, /* >> */
- PF_FixedPoint *pts ); /* <> */
-
-
- PF_Err HandleEvent (
- PF_InData *in_data,
- PF_OutData *out_data,
- PF_ParamDef *params[],
- PF_LayerDef *output,
- PF_EventExtra *event_extra );
-
- #endif
-